TargetFormCtl = Ext.extend(CmpControler, {

			bulidComponent : function() {

				var config = this.getCommonConfig();

				config = this.configItems(config);

				var item = new Ext.Panel(config);

				return item;
			},
			getCommonConfig : function() {

				var config = {
					// title : '基本信息',
					// region : 'west',
					frame : true,
					layout : 'form',
					// width : 300,
					split : true

				};

				return config;

			},
			configItems : function(config) {

				var ccCbb = this.getCcCbb();

				var isEditCbb = this.getIsEditCbb();

				var cbg = this.getTargetCheckGroup();

				var txArea = this.getMemoArea();

				this.memoArea = txArea;

				config.items = [ccCbb, isEditCbb, cbg, txArea];

				return config;

			},
			getMemoArea : function() {

				var config = {
					fieldLabel : '发布意见',
					width : 180,
					height : 100
				}

				var tcg = new Ext.form.TextArea(config);

				return tcg;

			},
			getTargetCheckGroup : function() {

				var config = this.getCgbConfig();

				var tcg = new Ext.form.CheckboxGroup(config);

				return tcg;

			},
			getCgbConfig : function() {

				var config = {
					fieldLabel : '发布目标',
					columns : 1
				};

				var items = this.getCbgItems();

				config.items = items;
				this.cbgItems = items;

				return config;

			},
			getCbgItems : function() {

				var data = this.getCbgItemsData();

				var dataItems = data.items;

				var itemArray = [];
				for (var i = 0; i < dataItems.length; i++) {
					var item = this.getCbgItem(dataItems[i]);
					itemArray.push(item);
				}

				return itemArray;

			},
			getCbgItem : function(dataItem) {

				var item = new Ext.form.Checkbox({
							boxLabel : dataItem.destName,
							name : dataItem.destId
						});

				return item;
			},
			getCbgItemsData : function() {

				var s = cf.getC('s');
				var para = {
					resource : 'destList.do',
					act : 'r'
				};
				var data = s.request(para, true);

				return data;

			},
			getCcCbb : function() {

				var config = {
					fieldLabel : '节目类别',
					mode : 'local',
					triggerAction : 'all',
					// disableKeyFilter : true,
					editable : false
				};

				config = this.getCcCbbStore(config);

				var combobox = new Ext.form.ComboBox(config);
				this.ccCbbx = combobox;

				return combobox;

			},
			getCcCbbStore : function(config) {

				var s = cf.getC('s');
				var para = {
					resource : 'catalogList.do',
					act : 'r'
				};
				var data = s.request(para, true);

				config.store = data; // [['f','Foo'],['b','Bar']];

				return config;

			},
			getIsEditCbb : function() {

				var config = {
					fieldLabel : '是否编辑',
					mode : 'local',
					triggerAction : 'all',
					// disableKeyFilter : true,
					editable : false
				};

				config = this.getIsEditCbbStore(config);

				var cbb = new Ext.form.ComboBox(config);
				this.isEditCbb = cbb;

				return cbb;

			},
			getIsEditCbbStore : function(config) {

				var data = this.getIsEditCbbData();
				var storeConfig = this.getIsEditCbbStoreConfig();

				var dataStore = new Ext.data.JsonStore(storeConfig);

				dataStore.loadData(data);

				config.valueField = 'isEdit';
				config.displayField = 'isEditName';

				config.store = dataStore; // [['f','Foo'],['b','Bar']];

				return config;

			},
			getIsEditCbbStoreConfig : function() {

				var config = {
					root : "items",
					// totalProperty : "totalCount",
					// id : 'entryId',
					fields : ["isEdit", "isEditName"]
				}

				return config;

			},
			getIsEditCbbData : function() {

				var data = {
					items : [{
								isEdit : false,
								isEditName : '否'
							}, {
								isEdit : true,
								isEditName : '是'
							}]
				}

				return data;

			},
			getClassId : function() {

				return this.ccCbbx.getValue();

			},
			getDestIdArray : function() {

				var cbgItems = this.cbgItems;

				var DestArray = [];
				for (var i = 0; i < cbgItems.length; i++) {
					var cbgItem = cbgItems[i];
					if (cbgItem.getValue()) {
						DestArray.push(cbgItem.getName());
					}

				}

				return DestArray;

			},
			getIsEdit : function() {

				return this.isEditCbb.getValue();

			},
			getMemo : function() {

				return this.memoArea.getValue();

			}

		});
